package o;

import android.content.Context;
import android.os.AsyncTask;
import com.huawei.appgallery.packagemanager.api.bean.ManagerTask;

public final class cpu extends AsyncTask<Void, Void, Void> {
    private Context ˊ;
    private final int ˋ;
    private final long ˎ;
    private final String ˏ;
    private final int ॱ;

    protected /* synthetic */ Object doInBackground(Object[] objArr) {
        return ˋ((Void[]) objArr);
    }

    private cpu(Context context, String str, int i, long j, int i2) {
        this.ˏ = str;
        this.ˋ = i;
        this.ˊ = context.getApplicationContext();
        this.ˎ = j;
        this.ॱ = i2;
    }

    public static void ॱ(Context context, String str, int i, long j, int i2) {
        new cpu(context, str, i, j, i2).execute(new Void[0]);
    }

    protected Void ˋ(Void... voidArr) {
        int i;
        cnz o_cnz;
        cpc ˎ = cpc.ˎ(this.ˊ);
        ˎ.ॱ();
        if (1 == this.ˋ) {
            i = 10;
            o_cnz = cnz.UNINSTALL_FINISH;
        } else {
            i = 9;
            o_cnz = cnz.NOT_HANDLER;
        }
        ManagerTask ˋ = cph.ॱ(this.ˊ).ˋ(this.ˏ, i, o_cnz, this.ˋ, this.ॱ, this.ˎ, cod.UNINSTALL);
        if (ˋ != null) {
            cnu.ˏ.ˋ("DealTheTashWhenUninstalled", "DealTheTashWhenUninstalled pkg :" + this.ˏ + ",returnCode:" + this.ˋ);
            if (ˋ.uninstallForAllUser && cop.ˊ != null) {
                cop.ˊ.ˏ(ˋ.packageName);
            }
        }
        ˎ.ˏ();
        return null;
    }
}
